var fs = require("fs" );
const { parse } = require( "path" );
fs.readFile("person1.json" , function(err,data){
 if(err){
console.log ("文件读取失败");
   }
else{
  var person1 = JSON. parse(data.toString( ) );
  fs .readFile( "person2.json" , function( err,data){
  var person2 = JSON.parse(data.toString() ) ;
   person1. push( person2);
   console.log( person1);
  var str = JSON. stringify(person1)
   fs.writeFile( "person3.json" , str,function( err){
if(err) throw err;
console.log ("文件写入成功");
})
})
}
})
